package online.cmagic.createType.prototype;

/**
 * @author wangsc
 * @date: 2020年04月12日 16:56
 * @since JDK 1.8
 */
public class TestClient {
    public static void main(String[] args) throws CloneNotSupportedException {
        Sheep sheep=new Sheep();
        sheep.setName("zhangsan");
        sheep.setAge("23");
        Sheep clone = (Sheep)sheep.clone();
        System.out.println(sheep.toString());
        System.out.println(clone.toString());

        sheep.setName("lisi");
        System.out.println("-----------------");
        System.out.println(sheep.toString());
        System.out.println(clone.toString());
    }
}
